package com.quick.develop.flowable.domain.dto.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @author junyuan.liu
 * @description:
 * @date 2022/8/26 14:39
 */
@ApiModel("管理后台 - 流程图元素")
@Data
public class BpmModelElementsDTO implements Serializable,Comparable<BpmModelElementsDTO> {

    private static final long serialVersionUID = 1554867733928965960L;

    @ApiModelProperty("元素ID")
    private String id;

    @ApiModelProperty("元素名称")
    private String name;


    @ApiModelProperty(value = "元素类型", notes = "用户任务：userTask，调用活动：callActivity")
    private String type;

    @ApiModelProperty(value = "是否多实例", notes = "可判断是否会签点")
    private boolean multiInstance;

    @ApiModelProperty(value = "流程节点排序")
    private int exeSort;
//    @Override
//    public String toString() {
//        return "BpmModelElementsDTO [ExeSort=" + exeSort + ", id=" + id + "]";
//    }

    @Override
    public int compareTo(BpmModelElementsDTO o) {
        return new Integer(this.getExeSort()).compareTo(o.getExeSort());
    }
}
